package com.thoughtworks.biblioteca;

import java.sql.*;
//Understands the configuration needed to create a connection to
//MySQL database
public class MySQLConnection {
	private static String url=new String("jdbc:mysql://localhost/biblioteca");
	private static String userName="root";
	private static String password="twu13";
	private static Connection connectionDatabase=null;
	public static Connection obtainConnection(){
		
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			connectionDatabase = DriverManager.getConnection(
					url, userName, password);
		} catch (Exception e) {
		}
		return connectionDatabase;
	}

}
